#include "networkloginedresponse.h"
#include <QVariant>

using namespace network;

LoginedResponse::LoginedResponse(int userId,
                                 const QString userName,
                                 const QString displayName,
                                 const QString avatar,
                                 const QString sessionKey,
                                 QObject *parent):
    Response(parent),
    m_userId(userId),
    m_userName(userName),
    m_displayName(displayName),
    m_avatar(avatar),
    m_sessionKey(sessionKey)
{
}

Response::Type LoginedResponse::type() const
{
    return Response::Logined;
}


QVariant LoginedResponse::data() const
{
    QVariantMap map;
    map.insert("userId", m_userId);
    map.insert("userName", m_userName);
    map.insert("displayName", m_displayName);
    map.insert("sessionKey", m_sessionKey);
    return map;
}
